Distance measuring apparatus and distance measuring method

ABSTRACT

A distance measuring apparatus measures a distance to a target based on reflected light in response to launched laser beam. A distance measuring process includes generating a difference binary image from first and second range images that are respectively generated in states without and with the target in front of a background and represent distances to each of range measurement points, extracting a first region greater than a first threshold from a non-background region of the difference binary image made up of non-background points, grouping adjacent points on the second range image into groups of adjacent points having close distance values, for each point within the first region, to extract second regions corresponding to the groups, and extracting a third region smaller than a second threshold from the second regions, to judge that each point within the third region is edge noise.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit of priority of theprior Japanese Patent Application No. 2016-202719, filed on Oct. 14,2016, the entire contents of which are incorporated herein by reference.

FIELD

The embodiments discussed herein are related to a distance measuringapparatus, a distance measuring method, and a computer-readable storagemedium.

BACKGROUND

A distance measuring apparatus that uses a laser beam launches the laserbeam in the form of pulses (hereinafter referred to as a “pulse laserbeam”), and detects the laser beam reflected from a target. A distanceto the target is measured from a TOF (Time Of Flight) ΔT of the laserbeam that is launched from the distance measuring apparatus, reflectedby the target, and returned and received by the distance measuringapparatus. When a velocity c of light is regarded to be approximately300,000 km/s, the distance to the target can be obtained from (c×ΔT)/2,for example.

A measured result of the distance measuring apparatus may in some casesbe output in the form of a range image (or depth map) in which distancevalues at each of range (or distance) measurement points are arranged inan order of the raster scanned samples, for example. The range image mayrepresent the distances to the range measurement points by pixels havingcolors according to the distances. In the range image representing thedistances to each of the range measurement points, it is possible tomeasure an accurate TOF value at an inner part or the like of thetarget, because the entire laser beam hits the target and is reflectedby the target.

On the other hand, in the range image representing the distances to eachof the range measurement points, a contour part of the targetcorresponds to a boundary part between the target and a background. Atthe boundary part, only a portion of the laser beam hits the target andis reflected by the target. For this reason, compared to the case inwhich the entire laser beam hits and is reflected by the target, anamount of the laser beam reflected from the boundary part is smaller,and a rise in an output signal waveform of a photodetector that detectsthe laser beam is more gradual. In addition, an amplitude of the outputsignal waveform of the photodetector that detects the laser beamreflected by the boundary part is lower compared to the case in whichthe entire laser beam hits and is reflected by the target, and a timingwhen the amplitude of the photodetector output exceeds a threshold valuefor judging the time when the laser beam reaches the target is delayed.Furthermore, compared to the case in which the entire laser beam hitsand is reflected by the target, the measured TOF value becomes larger byan amount corresponding to the delay in the amplitude of thephotodetector output exceeding the threshold value. For these reasons,the TOF value that is measured by detecting the laser beam reflectedfrom the boundary part of the target becomes larger than the TOF valuerepresenting the actual distance from the boundary part. In this case,when the range image representing the distances to each of the rangemeasurement points is generated based on the measured TOF values, agroup of pixels generated from the TOF values corresponding to theboundary part of the target appear as noise. On the other hand, it isimpossible to distinguish, simply from the magnitudes of the TOF values,whether the output signal waveform of the photodetector represents thedistance to the target or the distance from the boundary part of thetarget.

In this specification, in the range image representing the distances toeach of the range measurement points, the noise caused by the boundarypart of the target is referred to as “edge noise”. When athree-dimensional image of the target is generated based on the rangeimage representing the distances to each of the range measurementpoints, for example, the edge noise appears behind the target in thethree-dimensional image.

According to the conventional distance measuring apparatus, it isimpossible to distinguish whether the output signal waveform of thephotodetector represents the distance to the target or the distance fromthe boundary part of the target. Consequently, it is difficult to detectthe edge noise from the range image representing the distances to eachof the range measurement points.

Related art includes Japanese Laid-Open Patent Publications No.2005-242488 and No. 2014-035302, for example.

SUMMARY

Accordingly, it is an object in one aspect of the embodiments to providea distance measuring apparatus, a distance measuring method, and acomputer-readable storage medium, which can detect edge noise from arange image (or depth map) representing distances to each of range (ordistance) measurement points.

According to one aspect of the embodiments, a distance measuringapparatus includes a sensor configured to make a two-dimensional scan bylaunching a pulse laser beam and to measure a distance to a target basedon reflected light received from the target; a memory configured tostore a program; and a processor configured to execute the program andperform a process that includes generating a difference binary imagefrom a first range image that is generated in a state in which thetarget does not exist with respect to a background and representsdistances to each of a plurality of range measurement points, and asecond range image that is generated in a state in which the targetexists with respect to the background and represents the distances toeach of the plurality of range measurement points; extracting a firstregion having a size that is greater than or equal to a first thresholdvalue, from a non-background region of the difference binary image madeup of a plurality of non-background points; grouping adjacent points onthe second range image into a plurality of groups of adjacent pointshaving close distance values, for each of the points within the firstregion of the difference binary image, to extract second regionsrespectively corresponding to each of the plurality of groups ofadjacent points having the close distance values, wherein the adjacentpoints having the close distance values refer to points having distancevalues with a difference that is less than or equal to a thresholdvalue; and extracting a third region having a size that is less than orequal to a second threshold value, from the second regions of thedifference binary image, to output a judgment result which judges thateach of a plurality of points within the third region is edge noise.

The object and advantages of the invention will be realized and attainedby means of the elements and combinations particularly pointed out inthe claims.

It is to be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory and arenot restrictive of the invention, as claimed.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram illustrating an example of a distance measuringapparatus in one embodiment;

FIG. 2 is a block diagram illustrating an example of a computer;

FIG. 3 is a flow chart for explaining an example of a distance measuringprocess in a first embodiment;

FIG. 4 is a diagram for explaining an example of a process of step S1;

FIG. 5 is a diagram for explaining an example of a process of step S2;

FIG. 6 is a diagram for explaining an example of a process of step S3;

FIG. 7 is a diagram for explaining adjacent points having close distancevalues;

FIG. 8 is a diagram for explaining an example of a process of step S4;

FIG. 9 is a diagram for explaining an example of a 3-dimensional imagegeneration of a target based on a current range image that is notsubjected to a noise reduction process;

FIG. 10 is a diagram for explaining an example of a 3-dimensional imagegeneration of the target based on a range image that is subjected to anoise reduction process;

FIG. 11 is a flow chart for explaining, in more detail, the example ofthe distance measuring process in the first embodiment;

FIG. 12 is a flow chart for explaining, in more detail, the example ofthe distance measuring process in the first embodiment;

FIG. 13 is a flow chart for explaining an example of the distancemeasuring process in a second embodiment;

FIG. 14 is a diagram for explaining an example of processes of steps S41to S43;

FIG. 15 is a diagram for explaining an example of a process of step S41;

FIG. 16 is a diagram for explaining an example of judging an inner sideand an outer side of a contour line;

FIG. 17 is a diagram for explaining the example of judging the innerside and the outer side of the contour line;

FIG. 18 is a diagram for explaining an example of a process of step S42;

FIG. 19 is a diagram for explaining an example of a process of step S43;

FIG. 20 is a diagram for explaining an example of the noise reductionprocess; and

FIG. 21 is a flow chart for explaining, in more detail, the example ofthe distance measuring process in the second embodiment.

DESCRIPTION OF EMBODIMENTS

Preferred embodiments of the present invention will be described withreference to the accompanying drawings.

A description will now be given of a distance measuring apparatus, adistance measuring method, and a computer-readable storage medium ineach embodiment according to the present invention.

The disclosed distance measuring apparatus, distance measuring method,and computer-readable storage medium measure a distance to a targetbased on reflected light received from the target in response to makinga two-dimensional scan by launching a pulse laser beam. A distancemeasuring process includes

(a) generating a difference binary image from a first range image thatis generated in a state in which the target does not exist with respectto a background and represents distances to each of a plurality of rangemeasurement points, and a second range image that is generated in astate in which the target exists with respect to the background andrepresents the distances to each of the plurality of range measurementpoints;

(b) extracting a first region having a size that is greater than orequal to a first threshold value, from a non-background region of thedifference binary image made up of a plurality of non-background points;

(c) grouping adjacent points on the second range image into a pluralityof groups of adjacent points having close distance values, for each ofthe points within the first region of the difference binary image, toextract second regions respectively corresponding to each of theplurality of groups of adjacent points having the close distance values,wherein the adjacent points having the close distance values refer topoints having distance values with a difference that is less than orequal to a threshold value; and

(d) extracting a third region having a size that is less than or equalto a second threshold value, from the second regions of the differencebinary image, to output a judgment result which judges that each of aplurality of points within the third region is edge noise.

FIG. 1 is a diagram illustrating an example of a distance measuringapparatus in one embodiment. The distance measuring apparatusillustrated in FIG. 1 has a sensor 1 including a light launch unit ordevice (hereinafter simply referred to as a “launch unit”) 2 and a lightreception unit or device (hereinafter simply referred to as a “receptionunit”) 3, and a computer 4.

The launch unit 2 may have a known configuration including a controlcircuit 21, a light emission circuit 22, a laser light source 23, atwo-dimensional MEMS (Micro Electro Mechanical System) mirror 34, and ascan angle magnification lens 25, for example. In other words, thelaunch unit 2 is a hardware device. The control circuit 21 controls thelight emission circuit 22 so that the laser light source 23 emits apulse laser beam under the control of the light emission circuit 22. Inaddition, the control circuit 21 controls a known drive part (notillustrated) that drives the two-dimensional MEMS mirror 34two-dimensionally, so that the laser beam emitted from the laser lightsource 23 scans two-dimensionally (for example, in a horizontaldirection and a vertical direction with respect to ground surface).Accordingly, the laser beam makes a two-dimensional scan via the scanangle magnification lens 25 as indicated by a solid line in FIG. 1. Thelaser beam reflected by a target 100, which is an example of an objectto be measured, is received by the reception unit 3 as indicated by adotted line in FIG. 1. The laser light source 23 may have a knownconfiguration to emit an infrared or near-infrared laser beam, forexample.

The reception unit 3 may have a known configuration including areception lens 31, a photodetector 32, and a distance measuring circuit33. In other words, the reception unit 3 is a hardware device. The laserbeam deflected by the target 100 is detected by the photodetector 32 viathe reception lens 31. A detection output of the photodetector 32 issupplied to the distance measuring circuit 33. The distance measuringcircuit 33 measures a TOF (Time Of Flight) ΔT of the laser beam that islaunched from the distance measuring apparatus, reflected by the target100, and returned and received by the distance measuring apparatus, tooptically measure the distance to the target 100 and output a signalindicating the measured distance. When the velocity c of light isregarded to be approximately 300,000 km/s, the distance to the target100 can be obtained from (c×ΔT)/2, for example.

The signal indicating the distances to each of range measurement pointsmeasured by the distance measuring circuit 33 is output from thereception unit 3 to the computer 4. The range measurement points referto points on the target 100 to be measured, where the laser beamlaunched from the sensor 1 reaches. In this example, the rangemeasurement points include points on the target 100, and points on abackground within a scan range of the laser beam. In addition, thedistances to the range measurement points refer to the distances fromthe sensor 1 to the range measurement points. The computer 4 generates arange image (or depth map) representing the distances to each of therange measurement points, based on the signal indicating the distancesto each of the range measurement points. In this example, the computer 4generates a range image representing the distances to each of the rangemeasurement points by pixels having colors according to the distances,based on the signal indicating the distances to each of the rangemeasurement points. As indicated by a dotted line in FIG. 1, thecomputer 4 may set a light emission timing, a light emission power, orthe like of the laser light source 23 that is controlled by the controlcircuit 21 of the launch unit 2.

The computer 4 may have a configuration illustrated in FIG. 2, forexample. FIG. 2 is a block diagram illustrating an example of thecomputer. The computer 4 illustrated in FIG. 2 includes a processor 41,a memory 42, and input device 43, a display device 44, and an interface(or communication device) 45 that are connected to each other via a bus40. The processor 41 may be formed by a CPU (Central Processing Unit) orthe like, for example. The processor 41 executes one or more programsstored in the memory 42, to control the entire computer 4. The memory 42may be formed by computer-readable storage medium such as asemiconductor memory device, a magnetic recording medium, an opticalrecording medium, a magneto-optic recording medium, or the like, forexample. The memory 42 stores various programs including a distancemeasuring program executed by the processor 41, various data, or thelike. The memory 42 may be formed by a non-transitory computer-readablestorage medium that stores at least one program to be executed by theprocessor 41.

The input device 43 may be formed by a keyboard or the like that isoperated by a user (or operator) to input commands and data to theprocessor 41. The display device 44 may display messages, measuredresults of the distance measuring process, such as the range images, orthe like with respect to the user. The interface 45 may communicablyconnect the computer 4 to another computer or the like. In this example,the computer 4 is connected to the control circuit 21 of the launch unit2 via the interface 45.

The computer 4 is not limited to a hardware configuration in whichconstituent elements of the computer 4 are connected via the bus 40 asillustrated in FIG. 2. The computer 4 may be formed by a general-purposecomputer, for example.

The input device 43 and the display device 44 of the computer 4 may beomitted. In addition, in a case in which a module, a semiconductor chip,or the like has the computer 4 in which the interface 45 is furtheromitted in addition to the input device 43 and the display device 44,the output of the sensor 1 (that is, the output of the distancemeasuring circuit 33) may be connected to the bus 40, or may beconnected directly to the processor 41.

First Embodiment

FIG. 3 is a flow chart for explaining an example of a distance measuringprocess in a first embodiment. For example, the processor 41 of thecomputer 4 illustrated in FIG. 2 may execute a program stored in thememory 42, to perform the distance measuring process illustrated in FIG.3. In step S1 illustrated in FIG. 3, the processor 41 generates adifference binary image from two kinds of range images representing thedistances to each of the range measurement points by pixels havingcolors according to the distance values, for example. More particularly,as illustrated in FIG. 4, a difference binary image 103 is generatedfrom a background range image 101 and a current range image 102. FIG. 4is a diagram for explaining an example of a process of step S1. Thebackground range image 101 refers to a range image that is generated ina state in which no target exists with respect to the background, forexample. On the other hand, the current range image 102 refers to arange image that is generated in a state in which the target 100 existswith respect to the background. For the sake of convenience, in thebackground range image 101 and the current range image 102 illustratedin FIG. 4, the whiter the pixel, the closer the distance is to acorresponding range measurement point, and the darker the halftone ofthe pixel, the farther the distance is to the corresponding rangemeasurement point. In addition, a black pixel indicates a distance tothe corresponding range measurement point that is outside a measurablerange. Further, for the sake of convenience, in the difference binaryimage 103 illustrated in FIG. 4, two different tone levels of thehalftone are merely used to distinguish the different binary values, anddo not indicate the distance values to each of the range measurementpoints as in the case of the tone levels of the halftone used in thebackground range image 101 and the current range image 102 describedabove.

One point at a two-dimensional coordinate within the range imagerepresenting the distances to each of the range measurement points bythe pixels having the colors according to the distance values maycorrespond to one pixel of the range image, for example, or maycorrespond to a plurality of pixels of the range image. Whether to makeone point at the two-dimensional coordinate within the range imagerepresenting the distances to each of the range measurement points bythe pixels having the colors according to the distance values correspondto one pixel of the range image, or correspond to a plurality of pixelsof the range image, may be selected depending on a pulse period of thepulse laser beam, a resolution required of the range image, or the like,for example.

In step S2, the processor 41 extracts a first region 100A having a sizethat is greater than or equal to a first threshold value, from anon-background region of the difference binary image 103 made up ofnon-background points, as illustrated in FIG. 5. FIG. 5 is a diagram forexplaining an example of a process of step S2.

In step S3, the processor 41 groups adjacent points on the current rangeimage 102 into groups of adjacent points having close distance values,for each of the points within the first region 100A of the differencebinary image 103, to extract second regions 100B respectivelycorresponding to each group of adjacent points having the close distancevalues, as illustrated in FIG. 6. FIG. 6 is a diagram for explaining anexample of a process of step S3. For the sake of convenience, FIG. 6illustrates each of the second regions 100B by a different tone level ofthe halftone, however, the tone level does not indicate the distancevalue to each of the range measurement points.

FIG. 7 is a diagram for explaining adjacent points having close distancevalues. In an example illustrated in FIG. 7, eight adjacent points areprovided adjacent to a target point P1 indicated by hatchings, forexample. In the example illustrated in FIG. 7, the adjacent points aremutually adjacent points. In addition, the points having the closedistance values refer to points having distance values with a differencethat is less than or equal to a threshold value.

In step S4, the processor 41 extracts a third region 100-B1 having asize that is less than or equal to a second threshold value, from thesecond regions 100B of the difference binary image 103, and outputs ajudgment result which judges that each point within the third region100B-1 is the edge noise. The judgment result of step S4 may bedisplayed on the display device 44 illustrated in FIG. 2, for example,or may be output to an external apparatus (not illustrated), such asanother computer or the like, via the interface 45 illustrated in FIG.2, for example. FIG. 8 is a diagram for explaining an example of aprocess of step S4. For the sake of convenience, points 100C within aregion indicated by grey halftone correspond to points forming thetarget 100, points 100D within a white region correspond to pointsforming the edge noise, and points within a black region correspond topoints forming the background.

It is conceivable to detect the edge noise by judging whether a point iswithin a contour part of the target 100, for example. However, in a casein which the target 100 is a human being whose legs are not spread open,for example, the edge noise between the legs cannot be detected. On theother hand, according to the process of step S4, even in the case inwhich the target 100 is a human being whose legs are not spread open,for example, it is possible to detect the edge noise between the legs.

The process may end after step S4. But instead, a noise reductionprocess of step S5 may be performed after step S4. In step S5, theprocessor 41 performs the noise reduction process to reduce the edgenoise detected in step S4, from the current range image 102 illustratedin FIG. 9. A result of the noise reduction process of step S5 may bedisplayed on the display device 44 illustrated in FIG. 2, for example,or may be output to an external apparatus (not illustrated), such asanother computer or the like, via the interface 45 illustrated in FIG.2, for example. The current range image 102 illustrated in FIG. 9 is thesame as the current range image 102 illustrated in FIG. 4. By performingthe noise reduction process, it is possible to generate a range image104 from which the edge noise has been reduced or eliminated, asillustrated in FIG. 10. Accordingly, the accuracy of the range image canbe improved by performing the noise reduction process.

FIG. 9 is a diagram for explaining an example of a 3-dimensional imagegeneration of a target based on a current range image that is notsubjected to the noise reduction process. In addition, FIG. 10 is adiagram for explaining an example of a 3-dimensional image generation ofthe target based on a range image that is subjected to the noisereduction process. In the images illustrated in FIGS. 9 and 10, thewhiter the pixel, the closer the distance is to the corresponding rangemeasurement point, and the darker the halftone of the pixel, the fartherthe distance is to the corresponding range measurement point. Inaddition, the black pixel indicates the distance to the correspondingrange measurement point that is outside a measurable range.

For example, when the three-dimensional image of the target is generatedbased on the current range image 102 illustrated in FIG. 9 that is notsubjected to the noise reduction process, points 100B-2 forming the edgenoise appear behind the target (on the right side of the target in FIG.9) in a three-dimensional image 102A illustrated in FIG. 9. On the otherhand, when the three-dimensional image of the target is generated basedon the range image 104 illustrated in FIG. 10 that is subjected to thenoise reduction process, no points forming the edge noise appear behindthe target (on the right side of the target in FIG. 10) in athree-dimensional image 102B illustrated in FIG. 10. Hence, byperforming the noise reduction process, it is possible to improve theaccuracy of the three-dimensional image even in the case in which thethree-dimensional image of the target is generated, for example.

In the distance measuring apparatus illustrated in FIG. 1 that measuresthe distance to the target 100 based on the reflected light of the pulselaser beam that makes the two-dimensional scan, the computer 4 may forman example of a device or means that performs the process of step S1, togenerate the difference binary image 103 from the background range image101 and the current range image 102. The background range image 101 isan example of a first range image that is generated in a state in whichthe target 100 does not exist with respect to the background andrepresents the distances to each of the range measurement points. Thecurrent range image 102 is an example of a second range image that isgenerated in a state in which the target 100 exists with respect to thebackground and represents the distances to each of the range measurementpoints. The computer 4 may form an example of a device or means thatperforms the process of step S2, to extract the first region 100A havingthe size that is greater than or equal to the first threshold value,from the non-background region of the difference binary image 103 madeup of the non-background points. In addition, the computer 4 may form anexample of a device or means that performs the process of step S3, togroup adjacent points on the current range image 102 into groups ofadjacent points having close distance values, for each of the pointswithin the first region 100A of the difference binary image 103, and toextract the second regions 100B respectively corresponding to each groupof adjacent points having the close distance values. Further, thecomputer 4 may form an example of a device or means that performs theprocess of step S4, to extract the third region 100-B1 having the sizethat is less than or equal to the second threshold value, from thesecond regions 100B of the difference binary image 103, and to outputthe judgment result which judges that each point 100D within the thirdregion 100B-1 is the edge noise (100D).

The computer 4 may form an example of a device or means that performsthe process of step S5, to perform the noise reduction process to reducethe edge noise 100D. The computer 4 may also form a device or means thatperforms the process to generate the range image that represents thedistances to the range measurement points by the pixels having thecolors according to the distances.

FIGS. 11 and 12 are flow charts for explaining, in more detail, theexample of the distance measuring process in the first embodiment. Forexample, the processor 41 of the computer 4 illustrated in FIG. 2 mayexecute a program stored in the memory 42, to perform the distancemeasuring process illustrated in FIGS. 11 and 12. In step S11illustrated in FIG. 11, the processor 41 generates the difference binaryimage 103 from the background range image 101 and the current rangeimage 102 illustrated in FIG. 4. In the example illustrated in FIG. 4,between the different tone levels of the halftone in the differencebinary image 103, the black background corresponds to a binary value“0”, and the grey non-background corresponds to a binary value “1”. Theresult of the process of step S11 may correspond to the result of theprocess of step S1 illustrated in FIG. 3.

In step S12, the processor 41 judges whether the difference binary image103 includes an unprocessed target point having a binary value “1”. Theprocess advances to step S13 when the judgment result in step S12 isYES, and the process advances to step S16 which will be described laterwhen the judgment result in step S12 is NO. In step S13, the processor41 judges whether the adjacent points adjacent to the target pointincludes an unprocessed adjacent point. The process advances to step S14when the judgment result in step S13 is YES, and the process returns tostep S12 when the judgment result in step S13 is NO. In step S14, theprocessor 41 judges whether the unprocessed adjacent point has a binaryvalue “1”. The process advances to step S15 when the judgment result instep S14 is YES, and the process returns to step S12 when the judgmentresult in step S14 is NO. In step S15, the processor 41 groups thetarget point and the adjacent point having the binary value “1” into thesame group, and the process returns to step S12.

On the other hand, in step S16, the processor 41 sets a number (oridentification number) idx assigned to the region corresponding to thegroup formed in step S15 to idx=1. In step S17, the processor 41 judgeswhether the number idx is the number of regions or less. The processadvances to step S18 when the judgment result in step S17 is YES, andthe process advances to step S21 which will be described later when thejudgment result in step S17 is NO. In step S18, the processor 41 judgeswhether the size of the region assigned the number idx is less than orequal to a threshold size. The process advances to step S19 when thejudgment result in step S18 is YES, and the process advances to step S20which will be described later when the judgment result in step S18 isNO. In step S19, the processor 41 excludes the region assigned thenumber idx from candidates of the first region 100A having the sizegreater than or equal to the first threshold value, and the processadvances to step S20. In step S20, the processor 41 increments thenumber idx to idx=idx+1, and the process returns to step S17.

The result of the process in a case in which the judgment result in stepS17 is NO corresponds to the result of the process of step S2illustrated in FIG. 3, and the first region 100A can be extracted.

In step S21, the processor 41 sets a number (or identification number)idx1 to idx1=1, and the process advances to step S22. In step S22, theprocessor 41 judges whether the number idx1 is less than or equal to thenumber of first regions 100A. The process advances to step S23 when thejudgment result in step S22 is YES, and the process advances to step S31which will be described later in conjunction with FIG. 12 when thejudgment result in step S22 is NO. In step S23, the processor 41 judgeswhether an unprocessed target point exists in the first region 100Aassigned the number idx1. The process advances to step S24 when thejudgment result in step S23 is NO, and the process advances to step S25when the judgment result in step S23 is YES. In step S24, the processor41 increments the number idx1 to idx1=idx1+1, and the process returns tostep S22.

In step S25, the processor 41 judges whether the adjacent pointsadjacent to the target point includes an unprocessed adjacent point. Theprocess advances to step S26 when the judgment result in step S25 isYES, and the process returns to step S23 when the judgment result instep S25 is NO. In step S26, the processor 41 judges whether adifference between the distance value of the target point and thedistance value of the unprocessed adjacent point adjacent to the targetpoint is less than or equal to a threshold value. The process advancesto step S27 when the judgment result in step S26 is YES, and the processreturns to step S23 when the judgment result in step S26 is NO. In stepS27, the processor 41 groups the target point, and the unprocessedadjacent point that is adjacent to the target point and has the distancevalue with the difference from the distance value of the target pointless than or equal to the threshold value, into the same group, and theprocess returns to step S23.

The result of the process in a case in which the judgment result in stepS22 is NO corresponds to the result of the process of step S3illustrated in FIG. 3, and the second region 100B can be extracted.

In step S31 illustrated in FIG. 12, the processor 41 sets a number (oridentification number) idx2 to idx2=1, and the process advances to stepS32. In step S32, the processor 41 judges whether the number idx2 isless than or equal to the number of second regions 100B. The processadvances to step S33 when the judgment result in step S32 is YES, andthe process advances to step S36 when the judgment result in step S32 isNO. In step S33, the processor 41 judges whether the size of the secondregion 100B assigned the number idx2 is less than or equal to the secondthreshold value. The process advances to step S34 when the judgmentresult in step S33 is YES, and the process advances to step S35 when thejudgment result in step S33 is NO. In step S34, the processor 41 detectseach point within the second region 100B having the size less than orequal to the second threshold value, as the point forming the edgenoise, and the process advances to step S35. In step S35, the processor41 increments the number idx2 to idx2=idx2+1, and the process returns tostep S32.

The result of the process in a case in which the judgment result in stepS32 is NO corresponds to the result of the process of step S4illustrated in FIG. 3. The judgment result that is output indicates thateach point within each third region 100B-1 is judged as being the edgenoise. More particularly, in step S36, the processor 41 outputs thejudgment result indicating that each point within each third region100B-1 is judged as being the edge noise, and the process ends. In thiscase, the judgment result that is output may be displayed on the displaydevice 44 illustrated in FIG. 2, for example, or may be output to anexternal apparatus (not illustrated), such as another computer or thelike, via the interface 45 illustrated in FIG. 2, for example. A noisereduction process similar to that of step S5 illustrated in FIG. 3 maybe performed after step S36, to reduce the edge noise that is detected.

According to this embodiment, it is possible to detect the edge noisefrom the range image representing the distances to each of the rangemeasurement points. In addition, the detected edge noise may be reducedor eliminated from the range image by performing the noise reductionprocess, to improve the accuracy of the range image.

Second Embodiment

FIG. 13 is a flow chart for explaining an example of the distancemeasuring process in a second embodiment. For example, the processor 41of the computer 4 illustrated in FIG. 2 may execute a program stored inthe memory 42, to perform the distance measuring process illustrated inFIG. 13. In FIG. 13, steps S1 to S4 are the same as the correspondingsteps of the first embodiment illustrated in FIG. 3.

In this embodiment, the points that are detected as forming the edgenoise by steps S1 to S4 of the first embodiment described above areregarded as edge noise candidate points. In addition, amongst the edgenoise candidate points, a first point in contact with the background, ora second point in contact with an outer side of a contour line of thetarget, having a predetermined length or longer, is judged as being thepoint forming the edge noise. Amongst the edge noise candidate points,points other than the first or second point are excluded from the pointsforming the edge noise, to further improve the edge noise detectionaccuracy. Of course, when the first and second points are judged asbeing the points forming the edge noise, the points other than the firstand second points, amongst the edge noise candidate points, are excludedfrom the points forming the edge noise.

In step S41 illustrated in FIG. 13, the processor 41 regards the pointsthat are detected as forming the edge noise by the distance measuringprocess of the first embodiment described above, as the edge noisecandidate points, and judges the edge noise candidate point in contactwith the background. In step S42, the processor 41 judges the edge noisecandidate point in contact with the outer side of the contour line ofthe target, having the predetermined length or longer. In step S43, theprocessor 41 excludes the edge noise candidate points other than theedge noise candidate points judged in steps S41 and S42, from the pointsforming the edge noise. Further, in step S43, the processor 41 outputs ajudgment result indicating that the edge noise candidate points judgedin steps S41 and S42 are the points forming the edge noise. The judgmentresult that is output in step S43 may be displayed on the display device44 illustrated in FIG. 2, for example, or may be output to an externalapparatus (not illustrated), such as another computer or the like, viathe interface 45 illustrated in FIG. 2, for example. A noise reductionprocess similar to that of step S5 illustrated in FIG. 3 may beperformed after step S43, to reduce the edge noise that is detected.

FIG. 14 is a diagram for explaining an example of processes of steps S41to S43. In FIG. 14 and FIGS. 15, 19, and 20 which will be describedlater, for the sake of convenience, each point (corresponding to one ormore pixels) is illustrated by an enlarged square. In FIG. 14, in adifference binary image 203 that is obtained by the processes of stepsS1 to S4, a point 200C indicated by a grey halftone corresponds to atarget 200, a white point 200D corresponds to the edge noise, and ablack point corresponds to the background. In this example, the target200 is a human being. A point 200D-1 is detected as the edge noise dueto the effects of clothing or accessories worn by the target 200 andhaving a relatively low reflectivity. The point 200D-1 deteriorates theaccuracy of a recognition process or the like that is subsequentlyperformed using a difference binary image 203, when a point groupdensity at the part of the target 200 decreases. For this reason, inorder to prevent the point 200D-1 from being detected as the edge noiseor eliminated, it is desirable to replace the point 200D-1 by a pointthat does not form the edge noise or a point that is at the samedistance as the target 200. On the other hand, a point 200D-2 is locatedbetween the legs of the target 200 and is detected as the edge noise. Ifthe point 200D-2 between the legs of the target 200 were replaced by thepoint that is at the same distance as the target 200, the legs wouldappear as if the legs were connected in the range image. For thisreason, it is desirable to judge the point 200D-2 as the edge noise orto eliminate the point 200D-2 as the edge noise.

Accordingly, in this embodiment, the processes of steps S41 to S43obtain from the difference binary image 203 a difference binary image210 in which the edge noise is narrowed down. In the difference binaryimage 210 illustrated in FIG. 14, points 200E indicated by leftwardlydeclining hatching patterns and points 200F indicated by latticepatterns respectively form the contour line of the target 200, havingthe predetermined length or longer.

FIG. 15 is a diagram for explaining an example of a process of step S41.In the difference binary image 203 illustrated in FIG. 15 that isobtained by the processes of steps S1 to S4, the point 200C indicated bythe grey halftone corresponds to the point forming the target 200, thewhite point 200D corresponds to the point forming the edge noise, andthe black point corresponds to the point forming the background. In stepS41, the processor 41 regards the point 200D that is detected from thedifference binary image 203 as forming the edge noise by the distancemeasuring process, as the edge noise candidate point, and generates thedifference binary image 204 in which the point 200E is judged as theedge noise candidate point in contact with the background. In thedifference binary image 204, the edge noise candidate point 200E incontact with the background is indicated by a symbol “x” in FIG. 15.

FIGS. 16 and 17 are diagrams for explaining an example of judging aninner side and an outer side of a contour line. In FIG. 16, the targetpoint is indicated by a black square, and numbers “0” to “7” areassigned clockwise to the adjacent points adjacent to the target point.In FIG. 17, amongst three intermediate points on the contour line of thetarget 200, the Nth point is taken as a reference. When viewed from thisNth reference point, the (N−1)th point is assigned the number “7”, andthe (N+1)th point is assigned the number “3”. In addition, amongst theadjacent points adjacent to the Nth reference point, the points assignedthe numbers “0” to “3” clockwise correspond to the outer side of thecontour line, and the points assigned the numbers “4” to “6” clockwisecorrespond to the inner side of the contour line. In this example,because the points assigned the numbers “0” to “3” correspond to theouter side of the contour line, these points adjacent to the outer sideof the contour line of the target 200 can be judged as being the edgenoise candidate points.

FIG. 18 is a diagram for explaining an example of a process of step S42.From the difference binary image 204 including the edge noise candidatepoints 200E judged in step S41, the processor 41 judges, in step S42,the edge noise candidate points 200F in contact with the outer side ofthe contour line of the target 200, having the predetermined length orlonger, by the method described above in conjunction with FIGS. 16 and17. In a difference binary image 205, the edge noise candidate point200F in contact with the outer side of the contour line of the target200, having the predetermined length or longer, is also indicated by asymbol “x” in FIG. 18.

FIG. 19 is a diagram for explaining an example of a process of step S43.From the difference binary image 205, the processor 41 excludes, in stepS43, edge noise candidate points 200G other than the edge noisecandidate points 200E and 200F judged in steps S41 and S42, from thepoints 200D forming the edge noise. In step S43, the processor 41outputs a judgment result including a difference binary image 206 inwhich the edge noise candidate points 200E and 200F judged in steps S41and S42 are judged as being the points 200D forming the edge noise. Inthe difference binary image 206, the edge noise candidate point 200Gexcluded from the point forming the edge noise is indicated by a symbol“o” in FIG. 19.

FIG. 20 is a diagram for explaining an example of the noise reductionprocess. The process may end after step S43. But instead, the noisereduction process of step S5 may be performed after step S43. In stepS5, the processor 41 performs the noise reduction process to reduce theedge noise detected in step S43. More particularly, the processor 41obtains a difference binary image 207 illustrated in FIG. 20 byeliminating the points 200D forming the edge noise from the differencebinary image 206 generated in step S43, and outputs the result of thenoise reduction process. In this case, the points 200D forming the edgenoise (200D) that is eliminated, correspond to the edge noise candidatepoints excluding the edge noise candidate points 200G other than theedge noise candidate points 200E and 200F judged in steps S41 and S42.The result of the noise reduction process of step S5 may be displayed onthe display device 44 illustrated in FIG. 2, for example, or may beoutput to an external apparatus (not illustrated), such as anothercomputer or the like, via the interface 45 illustrated in FIG. 2, forexample.

The points 200G indicated by the symbol “o” in FIG. 19 are the pointsdetected as the edge noise due to the effects of the clothing or theaccessories worn by the target 200 and having the relatively lowreflectivity. The points 200G deteriorate the accuracy of therecognition process or the like that is subsequently performed using thedifference binary image 206, when the point group density at the part ofthe target 200 decreases. For this reason, in order to prevent thepoints 200G from being detected as the edge noise or eliminated, thisexample replaces the points 200G by a point that does not form the edgenoise or a point that is at the same distance as the target 200. On theother hand, the points 200E are located between the legs of the target200 and are detected as the edge noise. If the points 200E between thelegs of the target 200 were replaced by the point that is at the samedistance as the target 200, the legs would appear as if the legs wereconnected in the range image. For this reason, this example judges thepoints 200E as being the edge noise or eliminates the points 200E as theedge noise.

In the distance measuring apparatus illustrated in FIG. 1, the computer4 may form an example of a device or means that performs the processesof steps S41 to S43, to regard the points forming the edge noise 200Dobtained by the processes of steps S1 to S4, as the edge noise candidatepoints, and amongst the edge noise candidate points, to judge the firstpoints 200E in contact with the background, or the second points 200F incontact with the outer side of the contour line of the target 200,having the predetermined length or longer, as the points forming theedge noise, and to narrow down the edge noise 200D by excluding thepoints 200G other than the first and second points 200E and 200F.

The computer 4 may form an example of a device or means that performs aprocess to replace the excluded edge noise candidate point 200G by apoint having the same distance value as the target 200. In addition, thecomputer 4 may form an example of a device or means that performs anoise reduction process to reduce or eliminate the edge noise 200D fromthe current range image 102.

FIG. 21 is a flow chart for explaining, in more detail, the example ofthe distance measuring process in the second embodiment. For example,the processor 41 of the computer 4 illustrated in FIG. 2 may execute aprogram stored in the memory 42, to perform the distance measuringprocess illustrated in FIG. 21. In step S51 illustrated in FIG. 21, theprocessor 41 regards the points that are detected as forming the edgenoise by steps S1 to S4 of the distance measuring process of the firstembodiment described above, as the edge noise candidate points. In stepS52, the processor 41 judges whether an unprocessed edge noise candidatepoint exists. The process advances to step S53 when the judgment resultin step S52 is YES, and the process advances to step S55 which will bedescribed later when the judgment result in step S52 is NO. In step S53,the processor 41 judges whether the adjacent point adjacent to theunprocessed edge noise candidate point is included in the background.The process advances to step S54 when the judgment result in step S53 isYES, and the process returns to step S52 when the judgment result instep S53 is NO. In step S54, the processor 41 judges the edge noisecandidate point as being the edge noise point, and the process returnsto step S52.

The result of the process in a case in which the judgment result in stepS52 is NO corresponds to the result of the process of step S41illustrated in FIG. 13, and the difference binary image 204 illustratedin FIG. 15 can be generated.

In step S55, the processor 41 extracts, from the difference binary image203 that includes the points forming the edge noise and detected by theprocesses of steps S1 to S4 of the first embodiment, the contour line ofthe target 200 amongst the points 200C forming the target 200. In stepS56, the processor 41 sets a number idx3 assigned to the contour line toidx3=1. In step S57, the processor 41 judges whether the number idx3 isless than or equal to the number of contour lines. The process advancesto step S58 when the judgment result in step S57 is YES, and the processadvances to step S64 which will be described later when the judgmentresult in step S57 is NO. In step S58, the processor 41 judges whether alength of the contour line assigned the number idx3 is greater than orequal to a predetermined length. The process advances to step S59 whenthe judgment result in step S58 is YES, and the process advances to stepS61 which will be described later when the judgment result in step S58is NO. In step S59, the processor 41 sets a number idx4 assigned to thepoint on the contour line to idx4=1.

In step S60, the processor 41 judges whether the point on the contourline, assigned the number idx4, is less than or equal to the length ofthe contour line assigned the number idx3. The process advances to stepS62 when the judgment result in step S60 is YES, and the processadvances to step S61 when the judgment result in step S60 is NO. In stepS61, the processor 41 increments the number idx3 assigned to the contourline to idx3=idx3+1, and the process returns to step S57.

In step S62, the processor 41 judges whether the adjacent points on theouter side of the point that is assigned the number idx4 and is on thecontour line that is assigned the number idx3 include an edge noisecandidate point. The process advances to step S63 when the judgmentresult in step S62 is YES, and the process advances to step S64 when thejudgment result in step S62 is NO. In step S63, the processor 41 judgesthat the edge noise candidate point judged in step S62 forms the edgenoise, that is, is an edge noise point, and the process advances to stepS64. In step S64, the processor 41 increments the number idx4 assignedto the contour line to idx4=idx4+1, and the process returns to step S60.

The result of the process in a case in which the judgment result in stepS57 is NO corresponds to the result of the process of step S42illustrated in FIG. 13, and the difference binary image 205 illustratedin FIG. 18 can be generated.

In step S65, the processor 41 judges that all remaining edge noisecandidates are not edge noise points, and the process ends. The resultof the process of step S65 corresponds to the result of the process ofstep S43 illustrated in FIG. 13, and the difference binary image 206illustrated in FIG. 19 can be generated.

A noise reduction process similar to that of step S5 illustrated in FIG.13 may be performed after step S65, to reduce the edge noise that isdetected.

According to this embodiment, it is possible to detect the edge noisefrom the range image representing the distances to each of the rangemeasurement points. In addition, the detected edge noise may be reducedor eliminated from the range image by performing the noise reductionprocess, to improve the accuracy of the range image. Further, amongstthe edge noise candidate points, the point in contact with thebackground, or the point in contact with the outer side of the contourline of the target, having the predetermined length or longer, is judgedas being the point forming the edge noise. Other points amongst the edgenoise candidate points are excluded from the point forming the edgenoise, to further improve the edge noise detection accuracy.

Therefore, according to each of the embodiments described above, it ispossible to detect edge noise from a range image representing distancesto each of range (or distance) measurement points.

Although the embodiments are numbered with, for example, “first,” or“second,” the ordinal numbers do not imply priorities of theembodiments. Many other variations and modifications will be apparent tothose skilled in the art.

All examples and conditional language recited herein are intended forpedagogical purposes to aid the reader in understanding the inventionand the concepts contributed by the inventor to furthering the art, andare to be construed as being without limitation to such specificallyrecited examples and conditions, nor does the organization of suchexamples in the specification relate to a showing of the superiority andinferiority of the invention. Although the embodiments of the presentinvention have been described in detail, it should be understood thatthe various changes, substitutions, and alterations could be made heretowithout departing from the spirit and scope of the invention.

What is claimed is:
 1. A distance measuring apparatus comprising: asensor configured to make a two-dimensional scan by launching a pulselaser beam and to measure a distance to a target based on reflectedlight received from the target; a memory configured to store a program;and a processor configured to execute the program and perform a processincluding generating a difference binary image from a first range imagethat is generated in a state in which the target does not exist withrespect to a background and represents distances to each of a pluralityof range measurement points on the first range image, and a second rangeimage that is generated in a state in which the target exists withrespect to the background and represents the distances to each of theplurality of range measurement points on the second range image;extracting a first region having a size that is greater than or equal toa first threshold value, from a non-background region of the differencebinary image, made up of a plurality of non-background points; groupingadjacent points on the second range image into a plurality of groups ofadjacent points having close distance values, for each of the pointswithin the first region of the difference binary image, to extractsecond regions respectively corresponding to each of the plurality ofgroups of adjacent points having the close distance values, wherein theadjacent points having the close distance values refer to points havingdistance values with a difference that is less than or equal to apredetermined value; and extracting a third region having a size that isless than or equal to a second threshold value, from the second regionsof the difference binary image, to output a judgment result which judgesthat each of a plurality of points within the third region is edgenoise.
 2. The distance measuring apparatus as claimed in claim 1,wherein the processor performs the process further including narrowingdown the edge noise by regarding the plurality of points within thethird region that are judged as the edge noise by the judgment result asa plurality of edge noise candidate points, and judging a first point incontact with the background, or a second point in contact with an outerside of a contour line of the target and having a predetermined lengthor longer, as being the point forming the edge noise, to narrow down theedge noise by excluding points other than the first or second point fromthe plurality of points forming the edge noise.
 3. The distancemeasuring apparatus as claimed in claim 2, wherein the narrowing downincludes judging the plurality of points within the third region thatare judged as the edge noise by the judgment result as being theplurality of edge noise candidate points; judging, from amongst theplurality of edge noise candidate points, the first point in contactwith the background, as being the point forming the edge noise; judging,from amongst the plurality of edge noise candidate points, the secondpoint in contact with the outer side of the contour line of the target,having the predetermined length or longer, as being the point formingthe edge noise; and narrowing down the edge noise by excluding thepoints other than the first and second points from the plurality ofpoints forming the edge noise.
 4. The distance measuring apparatus asclaimed in claim 2, wherein the processor performs the process furtherincluding replacing the points excluded from the plurality of pointsforming the edge noise by the narrowing down by points having distancevalues identical to those of the target.
 5. The distance measuringapparatus as claimed in claim 1, wherein the processor performs theprocess further including performing a noise reduction process to reduceor eliminate the edge noise from the second range image.
 6. The distancemeasuring apparatus as claimed in claim 1, wherein one point at atwo-dimensional coordinate within the first and second range imagescorresponds to one or a plurality of pixels of the first and secondrange images.
 7. The distance measuring apparatus as claimed in claim 1,wherein the processor performs the process further including generatinga range image representing the distances to the plurality of rangemeasurement points by pixels having colors according to the distances.8. A distance measuring method comprising: controlling, by a computer, asensor to make a two-dimensional scan by launching a pulse laser beamand measure a distance to a target based on reflected light receivedfrom the target; generating, by the computer, a difference binary imagefrom a first range image that is generated in a state in which thetarget does not exist with respect to a background and representsdistances to each of a plurality of range measurement points on thefirst range image, and a second range image that is generated in a statein which the target exists with respect to the background and representsthe distances to each of the plurality of range measurement points onthe second range image; extracting, by the computer, a first regionhaving a size that is greater than or equal to a first threshold value,from a non-background region of the difference binary image, made up ofa plurality of non-background points; grouping, by the computer,adjacent points on the second range image into a plurality of groups ofadjacent points having close distance values, for each of the pointswithin the first region of the difference binary image, to extractsecond regions respectively corresponding to each of the plurality ofgroups of adjacent points having the close distance values, wherein theadjacent points having the close distance values refer to points havingdistance values with a difference that is less than or equal to apredetermined value; and extracting, by the computer, a third regionhaving a size that is less than or equal to a second threshold value,from the second regions of the difference binary image, to output ajudgment result which judges that each of a plurality of points withinthe third region is edge noise.
 9. The distance measuring method asclaimed in claim 8, further comprising: narrowing down, by the computer,the edge noise by regarding the plurality of points within the thirdregion that are judged as the edge noise by the judgment result as aplurality of edge noise candidate points, and judging a first point incontact with the background, or a second point in contact with an outerside of a contour line of the target and having a predetermined lengthor longer, as being the point forming the edge noise, to narrow down theedge noise by excluding points other than the first or second point fromthe plurality of points forming the edge noise.
 10. The distancemeasuring method as claimed in claim 9, wherein the narrowing downincludes judging the plurality of points within the third region thatare judged as the edge noise by the judgment result as being theplurality of edge noise candidate points; judging, from amongst theplurality of edge noise candidate points, the first point in contactwith the background, as being the point forming the edge noise; judging,from amongst the plurality of edge noise candidate points, the secondpoint in contact with the outer side of the contour line of the target,having the predetermined length or longer, as being the point formingthe edge noise; and narrowing down the edge noise by excluding thepoints other than the first and second points from the plurality ofpoints forming the edge noise.
 11. The distance measuring method asclaimed in claim 9, further comprising: replacing, by the computer, thepoints excluded from the plurality of points forming the edge noise bythe narrowing down by points having distance values identical to thoseof the target.
 12. The distance measuring method as claimed in claim 8,further comprising: performing, by the computer, a noise reductionprocess to reduce or eliminate the edge noise from the second rangeimage.
 13. The distance measuring method as claimed in claim 8, whereinone point at a two-dimensional coordinate within the first and secondrange images corresponds to one or a plurality of pixels of the firstand second range images.
 14. A non-transitory computer-readable storagemedium having stored therein a program for causing a computer to performa process comprising: controlling a sensor to make a two-dimensionalscan by launching a pulse laser beam and measure a distance to a targetbased on reflected light received from the target; generating adifference binary image from a first range image that is generated in astate in which the target does not exist with respect to a backgroundand represents distances to each of a plurality of range measurementpoints on the first ramie image, and a second range image that isgenerated in a state in which the target exists with respect to thebackground and represents the distances to each of the plurality ofrange measurement points on the second range image; extracting a firstregion having a size that is greater than or equal to a first thresholdvalue, from a non-background region of the difference binary image, madeup of a plurality of non-background points; grouping adjacent points onthe second range image into a plurality of groups of adjacent pointshaving close distance values, for each of the points within the firstregion of the difference binary image, to extract second regionsrespectively corresponding to each of the plurality of groups ofadjacent points having the close distance values, wherein the adjacentpoints having the close distance values refer to points having distancevalues with a difference that is less than or equal to a predeterminedvalue; and extracting a third region having a size that is less than orequal to a second threshold value, from the second regions of thedifference binary image, to output a judgment result which judges thateach of a plurality of points within the third region is edge noise. 15.The non-transitory computer-readable storage medium as claimed in claim14, wherein the process further comprises: narrowing down the edge noiseby regarding the plurality of points within the third region that arejudged as the edge noise by the judgment result as a plurality of edgenoise candidate points, and judging a first point in contact with thebackground, or a second point in contact with an outer side of a contourline of the target and having a predetermined length or longer, as beingthe point forming the edge noise, to narrow down the edge noise byexcluding points other than the first or second point from the pluralityof points forming the edge noise.
 16. The non-transitorycomputer-readable storage medium as claimed in claim 15, wherein thenarrowing down includes judging the plurality of points within the thirdregion that are judged as the edge noise by the judgment result as beingthe plurality of edge noise candidate points; judging, from amongst theplurality of edge noise candidate points, the first point in contactwith the background, as being the point forming the edge noise; judging,from amongst the plurality of edge noise candidate points, the secondpoint in contact with the outer side of the contour line of the target,having the predetermined length or longer, as being the point formingthe edge noise; and narrowing down the edge noise by excluding thepoints other than the first and second points from the plurality ofpoints forming the edge noise.
 17. The non-transitory computer-readablestorage medium as claimed in claim 15, wherein the process furthercomprises: replacing the points excluded from the plurality of pointsforming the edge noise by the narrowing down by points having distancevalues identical to those of the target.
 18. The non-transitorycomputer-readable storage medium as claimed in claim 14, wherein theprocess further comprises: performing a noise reduction process toreduce or eliminate the edge noise from the second range image.
 19. Thenon-transitory computer-readable storage medium as claimed in claim 14,wherein one point at a two-dimensional coordinate within the first andsecond range images corresponds to one or a plurality of pixels of thefirst and second range images.
 20. The non-transitory computer-readablestorage medium as claimed in claim 14, wherein the process furthercomprises: generating a range image representing the distances to theplurality of range measurement points by pixels having colors accordingto the distances.